package com.njtoyo.taxi.admin.rest.wrapper.marketing.seckill;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.njtoyo.taxi.admin.handler.common.TimestampJsonDeserializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ApiModel("修改秒杀活动")
public class UpdateSeckillWrapper {

    @NotBlank(message = "活动名称不能为空")
    @ApiModelProperty("活动名称")
    private String name;

    @ApiModelProperty("活动背景图")
    private String imageUrl;

    @ApiModelProperty("活动开始时间")
    @NotNull(message = "活动开始时间不能为空")
    @JsonDeserialize(using = TimestampJsonDeserializer.class)
    private Date startedAt;

    @ApiModelProperty("活动结束时间")
    @NotNull(message = "活动结束时间不能为空")
    @JsonDeserialize(using = TimestampJsonDeserializer.class)
    private Date endedAt;
}